package com.djinfo.work.entity;
// Generated 2016-5-11 11:24:26 by Hibernate Tools 5.1.0.Alpha1

import org.hibernate.annotations.GenericGenerator;

import java.beans.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.*;
import javax.persistence.Transient;

import static javax.persistence.CascadeType.ALL;

/**
 * 2.5.1.1 用户信息主表
 * 
 * @author wxf
 *
 */
@Entity
@Table(name = "tb_sys_user")
public class TbSysUsers implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String pkUserId;// 用户ID
	private String userCode; // 用户工号或编码
	private String userName; // 用户名
	private String userPassword;// 用户密码
	private String email="邮箱未知"; // 当前邮箱地址ַ
	private String phoneNum="电话号码未知";
	private String deptId;//部门编号
	private String createTime;//创建时间
	private String updateTime;//修改时间
	private String createUser;
	private String updateUser;
	private String realName;
	private String englishName;

	@Column(name = "create_user")
	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	@Column(name = "update_user")
	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	@Column(name = "create_time")
	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	@Column(name = "update_time")
	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "dept_id")
	public String getDeptId() {
		return deptId;
	}
	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}



	/*// 当前手机号码
	private List<TbSysRoles> roles=new ArrayList();
	@Transient
	public List<TbSysRoles> getRoles() {
		return roles;
	}

	public void setRoles(List<TbSysRoles> roles) {
		this.roles = roles;
	}

	private Set<TbSysRoleUser> rolerUsers=new HashSet<>();*/
	/*@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
	@JoinColumn(name = "UserID")
	public Set<TbSysRoleUser> getRolerUsers() {
		return rolerUsers;
	}

	public void setRolerUsers(Set<TbSysRoleUser> rolerUsers) {
		this.rolerUsers = rolerUsers;
	}*/

	public TbSysUsers() {
	}

	public TbSysUsers(String userCode, String userName) {
		this.userCode = userCode;
		this.userName = userName;
	}

	public TbSysUsers(String userCode, String userName, String email, String phoneNum
			) {
		this.userCode = userCode;
		this.userName = userName;
		this.email = email;
		this.phoneNum = phoneNum;
	}

	@Id
	@Basic(optional = false)
	@GeneratedValue(generator = "id")
	@GenericGenerator(name = "id", strategy = "uuid")
	@Column(name = "pk_user_id", unique = true, nullable = false)
	public String getPkUserId() {
		return this.pkUserId;
	}

	public void setPkUserId(String pkUserId) {
		this.pkUserId = pkUserId;
	}

	@Column(name = "user_code", nullable = false, length = 20)
	public String getUserCode() {
		return this.userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	@Column(name = "username", nullable = false, length = 20)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "password", nullable = false, length = 20)
	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	@Column(name = "email", length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "mobile", length = 20)
	public String getPhoneNum() {
		return this.phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}
	@Column(name = "real_name")
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
	@Column(name = "english_name")
	public String getEnglishName() {
		return englishName;
	}

	public void setEnglishName(String englishName) {
		this.englishName = englishName;
	}
}
